import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/LoginView.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component:LoginView
  },//登录
  {
    //主页
    path: '/home',
    name: 'home',
    component:()=>import('../views/HomeView.vue'),
     children:[
        {
          path: '/comment',
          name: 'comment',
          component:()=>import('../views/CommentView.vue')
        },//主页内容
        {
          path: '/number',
          name: 'number',
          component:()=>import('../views/NumberView.vue')
        },//预约挂号
        {
          path: '/numberdetail',
          name: 'numberdetail',
          component:()=>import('../views/NumberDetail.vue')
        },//挂号详情
        {
          path: '/test',
          name: 'test',
          component:()=>import('../views/TestView.vue')
        },//预约核酸检测
        {
          path: '/testdetail',
          name: 'testdetail',
          component:()=>import('../views/TestDetail.vue')
        },//预约详情
        {
          path: '/body',
          name: 'body',
          component:()=>import('../views/BodyView.vue')
        },//预约体检
        {
          path: '/bodydetail',
          name: 'bodydetail',
          component:()=>import('../views/BodyDetail.vue')
        },//预约体检详情
        {
          path: '/report',
          name: 'report',
          component:()=>import('../views/ReportView.vue')
        },//查看体检报告
        {
          path: '/doctor',
          name: 'doctor',
          component:()=>import('../views/DoctorView.vue')
        },//医生排班
        {
          path: '/doorbuy',
          name: 'doorbuy',
          component:()=>import('../views/DoorBuy.vue')
        },//门诊消费记录
        {
          path: '/doordetailb',
          name: 'doordetailb',
          component:()=>import('../views/DoorDetailB.vue')
        },//门诊消费记录详情/订单详情
        {
          path: '/dooradd',
          name: 'dooradd',
          component:()=>import('../views/DoorAdd.vue')
        },//门诊充值记录
        {
          path: '/doordetaila',
          name: 'doordetaila',
          component:()=>import('../views/DoorDetailA.vue')
        },//门诊充值记录详情
        {
          path: '/homebuy',
          name: 'homebuy',
          component:()=>import('../views/HomeBuy.vue')
        },//住院消费记录
        {
          path: '/homedetailb',
          name: 'homedetailb',
          component:()=>import('../views/HomeDetailB.vue')
        },//住院消费记录详情/订单详情
        {
          path: '/homeadd',
          name: 'homeadd',
          component:()=>import('../views/HomeAdd.vue')
        },//住院充值记录
        {
          path: '/homedetaila',
          name: 'homedetaila',
          component:()=>import('../views/HomeDetailA.vue')
        },//住院充值记录详情/充值详情
        {
          path: '/send',
          name: 'send',
          component:()=>import('../views/SendView.vue')
        },//病案配送记录
        {
          path: '/senddetail',
          name: 'senddetail',
          component:()=>import('../views/SendDetail.vue')
        },//配送详情
        {
          path: '/return',
          name: 'return',
          component:()=>import('../views/ReturnView.vue')
        },//退款记录
        {
          path: '/returndetail',
          name: 'returndetail',
          component:()=>import('../views/ReturnDetail.vue')
        },//退款记录
        {
          path: '/doctormanage',
          name: 'doctormanage',
          component:()=>import('../views/DoctorManage.vue')
        },//医生管理
        {
          path: '/homemanage',
          name: 'homemanage',
          component:()=>import('../views/HomeManage.vue')
        },//科室管理
    ]
  },
 
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
